package com.example.mypokerstats;
import Persistance.TMain;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * Fragment that appears in the "content_frame", shows a planet
 */
public class MainFragment extends Fragment {
	public static final String ARG_MAIN_NUMBER = "main_number";
	private TMain main;
	public View rootView;


	public TMain getMain() {
		return main;
	}

	public void setTournoi(TMain main) {
		this.main = main;
	}

	public MainFragment() {
		// Empty constructor required for fragment subclasses
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		rootView = inflater.inflate(R.layout.fragment_main, container, false);
		ChargerStyle ();
		ChargerDonnees ();
		BindToLayout ();
		return rootView;
	}

	public void BindToLayout (){

	}

	public void BindFromLayout (){

	}

	public void ChargerDonnees (){
		int i = getArguments().getInt(ARG_MAIN_NUMBER);
		main = new TMain ();
		main.setNum(i);
		main = (TMain) TMain.select(main);
		if(main != null)
			getActivity().setTitle("Main" + main.getNum());
	}

	public void ChargerStyle (){
		
	}



}